package com.ruoyi.camp.service.impl;

import java.util.List;

import com.ruoyi.camp.mapper.CampFacilityMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.camp.mapper.CFacilityTypeMapper;
import com.ruoyi.camp.domain.CFacilityType;
import com.ruoyi.camp.service.ICFacilityTypeService;

/**
 * 服务设施类型Service业务层处理
 *
 * @author ruoyi
 * @date 2024-11-01
 */
@Service
public class CFacilityTypeServiceImpl implements ICFacilityTypeService {
    @Autowired
    private CFacilityTypeMapper cFacilityTypeMapper;
    @Autowired
    private CampFacilityMapper campFacilityMapper;
    /**
     * 查询服务设施类型
     *
     * @param ftid 服务设施类型主键
     * @return 服务设施类型
     */
    @Override
    public CFacilityType selectCFacilityTypeByFtid(String ftid) {
        return cFacilityTypeMapper.selectCFacilityTypeByFtid(ftid);
    }

    /**
     * 查询服务设施类型列表
     *
     * @param cFacilityType 服务设施类型
     * @return 服务设施类型
     */
    @Override
    public List<CFacilityType> selectCFacilityTypeList(CFacilityType cFacilityType) {
        return cFacilityTypeMapper.selectCFacilityTypeList(cFacilityType);
    }

    @Override
    public List<CFacilityType> selectCFacilityTypeAndCFacilityList(CFacilityType cFacilityType) {
        return cFacilityTypeMapper.selectCFacilityTypeAndCFacilityList(cFacilityType);
    }
    @Override
    public List<CFacilityType> selectCFacilityTypeAndCFacilityListByCampId(String campid) {
        return cFacilityTypeMapper.selectCFacilityTypeAndCFacilityListByCampId(campid);
    }
    /**
     * 新增服务设施类型
     *
     * @param cFacilityType 服务设施类型
     * @return 结果
     */
    @Override
    public int insertCFacilityType(CFacilityType cFacilityType) {
        return cFacilityTypeMapper.insertCFacilityType(cFacilityType);
    }

    /**
     * 修改服务设施类型
     *
     * @param cFacilityType 服务设施类型
     * @return 结果
     */
    @Override
    public int updateCFacilityType(CFacilityType cFacilityType) {
        return cFacilityTypeMapper.updateCFacilityType(cFacilityType);
    }

    /**
     * 批量删除服务设施类型
     *
     * @param ftids 需要删除的服务设施类型主键
     * @return 结果
     */
    @Override
    public int deleteCFacilityTypeByFtids(String[] ftids) {
        return cFacilityTypeMapper.deleteCFacilityTypeByFtids(ftids);
    }

    /**
     * 删除服务设施类型信息
     *
     * @param ftid 服务设施类型主键
     * @return 结果
     */
    @Override
    public int deleteCFacilityTypeByFtid(String ftid) {
        return cFacilityTypeMapper.deleteCFacilityTypeByFtid(ftid);
    }

    @Override
    public int deleteCFacilityByCampId(String campid) {
        return campFacilityMapper.deleteCFacilityByCampId(campid);
    }
}
